package config

import (
	. "TaylorTest/app"
	controller "TaylorTest/controller"
	configController "TaylorTest/controller/config"
	"TaylorTest/filter"
)

func init() {
	//配置静态文件目录
	RegisterStaticFilePath("/", "/TaylorTest/static")

	//注册路由
	// 登录路由
	Route("/login", controller.Login)
	// 登出路由
	Route("/logout", controller.Logout)
	// 获取周期列表路由，需要权限过滤器"periodlist_get"
	Route("/config/getperiodlist", configController.GetPeriodList, filter.NewRightFilter("periodlist_get"))
	// 添加周期路由，需要权限过滤器"period_add"
	Route("/config/addperiod", configController.AddPeriod, filter.NewRightFilter("period_add"))
	// 更新周期路由，需要权限过滤器"period_update"
	Route("/config/updateperiod", configController.UpdatePeriod, filter.NewRightFilter("period_update"))
	// 删除周期路由，需要权限过滤器"period_delete"
	Route("/config/deleteperiod", configController.DeletePeriod, filter.NewRightFilter("period_delete"))
}
